<UserControl x:Class="BookSurfaceDemoApp.UCDataBindingTransformation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:local="clr-namespace:BookSurfaceDemoApp" Background="LightGray">
  <DockPanel ClipToBounds="True">
    <local:UCTitle DockPanel.Dock="Top" DataContext="DataBinding and transformations" />
    <s:SurfaceSlider x:Name="slider"  Minimum="0.1" Maximum="10" Value="1" DockPanel.Dock="Top" />
    <Border Padding="5">
      <Border.RenderTransform>
        <ScaleTransform ScaleX="{Binding ElementName=slider, Path=Value}" ScaleY="{Binding ElementName=slider, Path=Value}" />
      </Border.RenderTransform>
      <StackPanel>
        <s:SurfaceTextBox x:Name="tbSample" Text="type some text here !" />
        <s:SurfaceButton Content="{Binding ElementName=tbSample, Path=Text}" />
        <Separator />
        <s:SurfaceCheckBox x:Name="checkbox">Click me to Enable/Disable the textbox below</s:SurfaceCheckBox>
        <s:SurfaceTextBox IsEnabled="{Binding ElementName=checkbox, Path=IsChecked}">textbox below</s:SurfaceTextBox>
      </StackPanel>
    </Border>    
  </DockPanel>
</UserControl>
